<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var obj = {
      "products":[{"id":"products_tr_DfLCLD7KRNQhWtgBrnXpBt0kDYXORw1661938176522","product_type":"产品1","Qc":"呃呃呃","Qh":"1"}],
      "fossil_energy":[],
      "electric_energy":[],
      "normalFields":[]
    }

    function filterByKey(obj,key){
      var newObj = {};
      for(var k in obj) {
        if(k !== 'normalFields'){
          newObj[k] = [];
          for(var i = 0; i < obj[k].length; i++) {
            var tempObj = {}
            for(var v in obj[k][i]){
              console.log(v,key)
              if(v !== key){
                tempObj[v] = obj[k][i][v]
              }
            }
            newObj[k].push(tempObj)
          }
        }
      }
      return newObj;
    }
    console.log()
    var t1 = Date.now()
    filterByKey(obj,'id')
    var t2 = Date.now()
    console.log(t2-t1)

  </script>
</body>
</html>